var t, a = require("../../../@babel/runtime/helpers/defineProperty"), e = getApp(), i = 2 * e.globalData.statusBarHeight, s = "plugin.store-alone-temp.frontend.videoShare.video.get-list";

Page({
    data: (t = {
        isShowADLook: !0,
        isShowADPut: !0,
        statusBarHeight: i,
        language: "",
        amount_id: null,
        isLoadMore: !0,
        page: 1,
        total_page: 0,
        popularVideo: [],
        heightauto: "auto",
        widthauto: "auto",
        showVideo: {},
        myvideo: "",
        show: !1,
        screeheight: 0,
        minStyle: !0,
        firstcontent: !1,
        cleartime: null,
        realIndex: 0,
        kFootshow: !0,
        is_plugins: 0,
        AnswerID: 0,
        showVideoAnswer: !1,
        successShow: !1,
        errorShow: !1,
        subject: null,
        integral: 0,
        vid: 0,
        integral_name: "积分",
        reward_type: 0,
        logID: 0,
        maxTime: 0,
        activity_reward_id: 0,
        redpack_info: {
            amount: 0
        },
        is_openRedpack: !1,
        openRedpackData: [],
        openRedpackTimes: [],
        showVerification: !1,
        showRedpack: !1,
        openRedpack: !1,
        currentDuration: 0,
        cumulativeDuration: 0,
        start1: !1,
        codetext: "获取验证码",
        bind_mobile: !1,
        imgcode: "",
        cationCode: !1,
        count: "",
        form: {
            mobile: "",
            code: "",
            captcha: ""
        },
        timer: null,
        loading: !1,
        dataList: [],
        BasicSet: {},
        activeType: 0,
        currentVideoIndex: 0,
        swiperDuration: 500,
        showCommentInput: !1,
        commentInputOptiones: {},
        showSheet: !1,
        actions: [ {
            name: "回复",
            index: 0
        }, {
            name: "删除",
            index: 1
        } ],
        comment_open: "1",
        commentlist: [],
        showYzComment: !1,
        commentLoading: !1,
        commentFinished: !1,
        commentTotal: 0,
        commentPage: 1,
        points_plugin: 0,
        videoShare: {
            needAnswer: !1,
            is_show: !1,
            show: !1,
            points: 0,
            point_name: ""
        }
    }, a(t, "actions", []), a(t, "actionsShow", !1), a(t, "rotateRight", "-45"), a(t, "rotateLeft", "-45"), 
    t),
    onLoad: function(t) {
        this.data.myvideo = wx.createVideoContext("myvideo"), this.getinformation(), this.setData({
            options: t
        }), t.vid && this.setData({
            amount_id: t.vid
        }), t.mid && e._setMid(t.mid), t.status && this.setData({
            cardFrom: "my",
            sta: t.status
        }), t.card_id && this.setData({
            card_id: t.card_id
        }), t.from && this.setData({
            cardFrom: t.from
        });
        try {
            wx.setStorageSync("vid", this.data.amount_id);
        } catch (t) {
            console.log(t);
        }
        t.page && this.setData({
            page: Number(t.page) ? Number(t.page) : 1
        }), t.category ? this.getBasicSet(!1) : t.page || !t.vid ? this.getBasicSet(!0) : this.getBasicSet(!1), 
        t.shr && this.updateShare();
    },
    gofabu: function() {
        wx.navigateTo({
            url: "/packageC/video_goods/releaseVideo/releaseVideo"
        });
    },
    gomy: function(t) {
        if ("my" != this.data.cardFrom) {
            var a = t.currentTarget.dataset.uid;
            wx.navigateTo({
                url: "/packageC/video_goods/myVideo/myVideo?uid=" + a
            });
        }
    },
    onReady: function() {
        var t = wx.getStorageSync("langIndex");
        this.setData({
            language: t.en
        });
    },
    goBack: function() {
        wx.navigateBack({
            delta: 1
        });
    },
    onShow: function() {
        "shareVideo" == this.data.options.task_type && this.shareTask();
    },
    onHide: function() {},
    actonCancel: function() {
        this.setData({
            actionsShow: !1
        });
    },
    getSubject: function() {
        var t = this;
        if (1 == this.data.is_plugins) if (this.data.AnswerID != this.data.amount_id) {
            this.data.AnswerID = this.data.amount_id;
            var i = e.getNetAddresss("plugin.answer-reward.api.index.get-subject");
            e._getNetWork({
                url: i,
                data: {
                    vid: this.data.amount_id
                },
                success: function(e) {
                    var i = e.data;
                    if (1 == i.result) {
                        if (1 != i.data.status) wx.showToast({
                            title: i.msg,
                            icon: "none",
                            duration: 1500
                        }), t.data.myvideo.play(); else if (null != i.data.subject) {
                            var s;
                            t.data.myvideo.pause();
                            var o = i.data.subject.has_many_answer.filter(function(t) {
                                return "" != t.content;
                            });
                            t.setData((s = {
                                integral_name: i.data.integral_name,
                                subject: i.data.subject
                            }, a(s, "subject.has_many_answer", o), a(s, "showVideoAnswer", !0), a(s, "videoShare.needAnswer", !0), 
                            s));
                        } else t.includeRedpackID("vid");
                        t.getVideoShareWatch();
                    } else t.data.myvideo.play(), t.includeRedpackID("vid", 0, "fail", i.msg);
                },
                fail: function(t) {
                    console.log(t);
                }
            });
        } else this.includeRedpackID("vid"); else this.getVideoShareWatch();
    },
    getVideoShareWatch: function() {
        var t = this;
        if (1 == this.data.points_plugin) {
            var i = e.getNetAddresss("plugin.video-share.frontend.video.watch-video");
            e._getNetWork({
                url: i,
                data: {
                    video_id: this.data.amount_id
                },
                success: function(e) {
                    var i = e.data;
                    if (1 == i.result) if (0 == i.data.is_show) t.data.myvideo.play(), t.setData(a({}, "dataList[" + t.data.activeType + "].list[" + t.data.realIndex + "].show", !0)); else {
                        t.data.myvideo.pause(), t.setData(a({}, "dataList[" + t.data.activeType + "].list[" + t.data.realIndex + "].show", !1));
                        var s = {};
                        s["videoShare.points"] = i.data.points, s["videoShare.point_name"] = i.data.point_name, 
                        s["videoShare.is_show"] = i.data.is_show, s["videoShare.days"] = i.data.days || 0, 
                        t.data.videoShare.needAnswer || (s["videoShare.show"] = i.data.is_show), t.setData(s);
                    } else t.data.myvideo.play(), t.includeRedpackID("vid", 0, "fail", i.msg);
                },
                fail: function(t) {
                    console.log(t);
                }
            });
        } else this.includeRedpackID("vid");
    },
    reward: function(t) {
        var a = this, i = t.currentTarget.dataset.id;
        console.log(t);
        var s = e.getNetAddresss("plugin.answer-reward.api.index.index");
        e._getNetWork({
            url: s,
            data: {
                vid: this.data.amount_id,
                subject_id: this.data.subject.id,
                answer_id: i
            },
            success: function(t) {
                var e = t.data;
                1 != e.result ? a.setData({
                    errorShow: !0,
                    showVideoAnswer: !1
                }) : 0 == e.data.status ? wx.showToast({
                    title: e.msg,
                    icon: "none",
                    duration: 1500
                }) : 1 == e.data.status && (a.setData({
                    integral: e.data.integral
                }), a.includeRedpackID("vid", 0, "success"));
            }
        });
    },
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    gotoVideoAgreement: function() {
        wx.redirectTo({
            url: "/packageC/video_goods/videoAgreement/videoAgreement"
        });
    },
    countDownChange: function(t) {
        this.setData({
            timeData: t.detail
        });
    },
    onShareTimeline: function() {
        var t = wx.getStorageSync("yz_uid"), a = "";
        t && (a = t);
        var e = {}, i = "";
        return this.data.dataList[this.data.activeType] && this.data.dataList[this.data.activeType].list[this.data.realIndex] && this.data.dataList[this.data.activeType].list[this.data.realIndex].cover && (i = this.data.dataList[this.data.activeType].list[this.data.realIndex].cover), 
        e = "card" != this.data.cardFrom && "my" != this.data.cardFrom ? {
            title: this.data.showVideo.title ? this.data.showVideo.title : "",
            query: "vid=" + this.data.amount_id + "&mid=" + a
        } : {
            title: this.data.showVideo.title ? this.data.showVideo.title : "",
            query: "vid=" + this.data.amount_id + "&page=" + this.page + "&mid=" + a + "&shr=1"
        }, "video" == this.data.options.task_type && (e.query += "&taskID=".concat(this.data.options.taskID, "&taskDay=").concat(this.data.options.taskDay, "&task_type=shareVideo"), 
        console.log(e, "ddddddd1")), i && (e.imageUrl = i), console.log(e), e;
    },
    onShareAppMessage: function(t) {
        console.log(t);
        var a = wx.getStorageSync("yz_uid"), e = "";
        a && (e = a);
        var i = {}, s = "";
        return this.data.dataList[this.data.activeType] && this.data.dataList[this.data.activeType].list[this.data.realIndex] && this.data.dataList[this.data.activeType].list[this.data.realIndex].cover && (s = this.data.dataList[this.data.activeType].list[this.data.realIndex].cover), 
        i = "card" != this.data.cardFrom && "my" != this.data.cardFrom ? {
            title: this.data.showVideo.title ? this.data.showVideo.title : "",
            path: "/packageC/video_goods/VideoDetail/VideoDetail?vid=" + this.data.amount_id + "&mid=" + e + "&shr=1"
        } : {
            title: this.data.showVideo.title ? this.data.showVideo.title : "",
            path: "/packageC/video_goods/VideoDetail/VideoDetail?vid=" + this.data.amount_id + "&page=" + this.data.page + "&mid=" + e + "&shr=1"
        }, "video" == this.data.options.task_type && (i.path += "&taskID=".concat(this.data.options.taskID, "&taskDay=").concat(this.data.options.taskDay, "&task_type=shareVideo"), 
        console.log(i, "ddddddd1")), s && (i.imageUrl = s), i;
    },
    getBasicSet: function(t) {
        var a = this, i = e.getNetAddresss("plugin.video-share.frontend.video.getBasicSet");
        e._getNetWork({
            url: i,
            data: {
                vid: this.options.vid
            },
            success: function(e) {
                var i = e.data;
                if (1 == i.result) {
                    var s = [];
                    i.data.set.is_show_own_follow && "1" == i.data.set.is_show_own_follow && s.push({
                        isLoadMore: !0,
                        page: 1,
                        total_page: 0,
                        list: [],
                        code: "follow",
                        activeVideoIndex: 0,
                        title: "关注"
                    }), i.data.set.is_show_recommend && "1" == i.data.set.is_show_recommend && s.push({
                        isLoadMore: !0,
                        page: 1,
                        total_page: 0,
                        list: [],
                        code: "recommend",
                        activeVideoIndex: 0,
                        title: "推荐"
                    }), s.push({
                        isLoadMore: !0,
                        page: a.data.page,
                        total_page: 0,
                        list: [],
                        code: "default",
                        activeVideoIndex: 0,
                        title: "最新"
                    }), a.setData({
                        BasicSet: i.data.set,
                        dataList: s,
                        activeType: s.length - 1
                    }), t ? a.getData(!1, !0) : a.getDetail();
                } else wx.showToast({
                    title: i.msg,
                    icon: "none",
                    duration: 1500
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    },
    getDetail: function() {
        var t = this, a = e.getNetAddresss("plugin.video-share.frontend.video.getVideoGoods");
        a += "&video_goods_id=" + this.data.amount_id, e._getNetWork({
            url: a,
            success: function(a) {
                var e = a.data;
                1 == e.result ? (t.setData({
                    showVideo: e.data.video_goods
                }), t.getData(!0, !0)) : wx.showToast({
                    title: e.msg,
                    icon: "none",
                    duration: 1500
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    },
    getData: function(t, i) {
        var o = this, d = this, n = "", r = {
            detail: {
                current: this.data.dataList[this.data.activeType].activeVideoIndex
            }
        };
        if (this.data.dataList[d.data.activeType].list.length > 0) return console.log("切换时，跳转到之前的视频位置记录"), 
        this.data.isLoadMore = this.data.dataList[this.data.activeType].isLoadMore, this.setData({
            amount_id: null,
            swiperDuration: 0,
            currentVideoIndex: this.data.dataList[this.data.activeType].activeVideoIndex
        }), console.log("popularVideoChange1"), void this.popularVideoChange(r);
        var c = {};
        "default" == this.data.dataList[this.data.activeType].code ? "card" == this.data.cardFrom ? (n = e.getNetAddresss("plugin.business-card.frontend.controllers.card.paging.videos"), 
        c.card_id = this.data.card_id) : "my" == d.data.cardFrom ? (n = e.getNetAddresss("plugin.video-share.frontend.video.my-video"), 
        c.vid = this.data.amount_id, c.status = this.data.sta, c.v_uid = this.options.uid || "", 
        this.setData(a({}, "dataList[" + d.data.activeType + "].title", "我的"))) : n = e.getNetAddresss(1 == e.globalData.store_alone_temp ? s : "plugin.video-share.frontend.video.getList") : (n = e.getNetAddresss(1 == e.globalData.store_alone_temp ? s : "plugin.video-share.frontend.video.getList"), 
        "follow" == this.data.dataList[this.data.activeType].code ? c = {
            search: {
                is_follow: 1
            }
        } : "recommend" == this.data.dataList[this.data.activeType].code && (c = {
            search: {
                is_recommend: 1
            }
        })), c.page = this.data.dataList[this.data.activeType].page, e._postNetWork({
            url: n,
            data: c,
            success: function(e) {
                var s = e.data;
                if (1 == s.result) {
                    d.data.isLoadMore = !0;
                    try {
                        d.setData({
                            is_plugins: s.data.is_plugins,
                            points_plugin: s.data.points_plugin
                        });
                    } catch (t) {
                        console.log(t);
                    }
                    try {
                        if (s.data.video_redpack && 1 === s.data.video_redpack.is_open) {
                            console.log("短视频红包================"), d.setData({
                                is_openRedpack: !0,
                                openRedpackData: s.data.video_redpack.data
                            });
                            for (var n = 0; n < d.data.openRedpackData.length; n++) "1" === d.data.openRedpackData[n].view_time_open_state && d.data.openRedpackTimes.push(d.data.openRedpackData[n].view_time_data);
                            d.data.openRedpackTimes = d.data.openRedpackTimes.sort(function(t, a) {
                                return t - a;
                            }), console.log("短视频红包累计观看时长数组", d.data.openRedpackTimes);
                        }
                    } catch (t) {
                        console.log("error", t);
                    }
                    var r;
                    if (s.data.hasOwnProperty("comment_open") && o.setData({
                        comment_open: s.data.comment_open
                    }), i) if ("card" == d.data.cardFrom) {
                        d.data.dataList[d.data.activeType].total_page = s.data.last_page, d.setData(a({}, "dataList[" + d.data.activeType + "].list", s.data.data));
                        var c = s.data.data;
                        if (d.data.amount_id) {
                            for (var l = 0; l < s.data.data.length; l++) if (s.data.data[l].id == d.data.amount_id) return d.setData({
                                showVideo: s.data.data[l]
                            }), c.splice(0, l), d.setData(a({}, "dataList[" + d.data.activeType + "].list", c)), 
                            d.setData({
                                firstcontent: !0
                            }), void d.clickSwiperbtn(0);
                        } else d.setData({
                            showVideo: d.data.dataList[d.data.activeType].list[0]
                        }), d.clickSwiperbtn(0);
                    } else if ("my" == d.data.cardFrom) {
                        d.data.dataList[d.data.activeType].total_page = s.data.video.last_page, d.setData(a({}, "dataList[" + d.data.activeType + "].list", s.data.video.data));
                        var h = s.data.video.data;
                        if (d.data.amount_id) {
                            for (var u = 0; u < s.data.video.data.length; u++) if (s.data.video.data[u].id == d.data.amount_id) return d.setData({
                                showVideo: s.data.video.data[u]
                            }), h.splice(0, u), d.setData(a({}, "dataList[" + d.data.activeType + "].list", h)), 
                            d.setData({
                                firstcontent: !0
                            }), void d.clickSwiperbtn(0);
                        } else d.setData({
                            showVideo: d.data.dataList[d.data.activeType].list[0]
                        }), d.clickSwiperbtn(0);
                    } else {
                        d.data.dataList[d.data.activeType].total_page = s.data.list.last_page, d.setData(a({}, "dataList[" + d.data.activeType + "].list", s.data.list.data));
                        var m = s.data.list.data;
                        if (t) {
                            if (d.data.amount_id) {
                                for (var p = 0; p < s.data.list.data.length; p++) if (s.data.list.data[p].id == d.data.amount_id) {
                                    m.splice(p, 1);
                                    break;
                                }
                                m.unshift(d.data.showVideo), d.setData(a({}, "dataList[" + d.data.activeType + "].list", m)), 
                                d.clickSwiperbtn(0);
                            }
                        } else if (d.data.amount_id) {
                            for (var g = 0; g < s.data.list.data.length; g++) if (s.data.list.data[g].id == d.data.amount_id) return d.setData({
                                showVideo: s.data.list.data[g]
                            }), m.splice(0, g), d.setData(a({}, "dataList[" + d.data.activeType + "].list", m)), 
                            d.setData({
                                firstcontent: !0
                            }), console.log("flag2"), void d.clickSwiperbtn(0);
                        } else d.setData({
                            showVideo: d.data.dataList[d.data.activeType].list[0]
                        }), d.clickSwiperbtn(0);
                    } else d.setData((a(r = {}, "dataList[" + d.data.activeType + "].list", s.data.list.data), 
                    a(r, "dataList[" + d.data.activeType + "].total_page", s.data.list.last_page), r)), 
                    d.data.dataList[d.data.activeType].list.length > 0 && (d.setData({
                        amount_id: d.data.dataList[d.data.activeType].list[0].id,
                        showVideo: d.data.dataList[d.data.activeType].list[0],
                        currentVideoIndex: 0
                    }), console.log("popularVideoChange2"), d.popularVideoChange({
                        detail: {
                            current: 0
                        }
                    }));
                    d.setData({
                        firstcontent: !0,
                        loading: !0
                    });
                } else wx.showToast({
                    title: s.msg,
                    icon: "none",
                    duration: 1500
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    },
    onChangeVideoTab: function(t) {
        this.setData({
            activeType: t.detail.index
        }), this.getData(!1, !1);
    },
    getinformation: function() {
        try {
            var t = wx.getSystemInfoSync(), a = t.windowHeight, e = t.windowWidth;
            this.setData({
                heightauto: a + "px",
                widthauto: e + "px"
            }), this.data.screeheight = a;
        } catch (t) {}
    },
    clickSwiperbtnLong: function(t) {
        var a = 0;
        a = t.currentTarget ? t.currentTarget.dataset.index : t, this.setData({
            actionsShow: !0,
            actions: [ {
                name: "保存视频",
                color: "#000000",
                index: a
            } ]
        });
    },
    actionSelect: function(t) {
        var a = this, e = t.detail.index, i = this.data.dataList[this.data.activeType].list[e].video_src;
        wx.downloadFile({
            url: i,
            success: function(t) {
                console.log(t), a.saveVideo(t.tempFilePath);
            }
        });
    },
    saveVideo: function(t) {
        var a = this;
        wx.showLoading({
            title: "保存中"
        }), wx.saveVideoToPhotosAlbum({
            filePath: t,
            success: function(t) {
                console.log(t), wx.hideLoading(), wx.showToast({
                    title: "保存成功"
                }), a.setData({
                    actionsShow: !1
                });
            },
            fail: function(t) {
                a.setData({
                    actionsShow: !1
                }), wx.hideLoading(), wx.showToast({
                    title: t.errMsg
                });
            }
        });
    },
    clickSwiperbtn: function(t) {
        var a = 0;
        a = t.currentTarget ? t.currentTarget.dataset.index : t, this.clickSwiper(a);
    },
    clickSwiper: function(t) {
        var e = t;
        if (0 != this.data.dataList[this.data.activeType].list.length) if (this.data.dataList[this.data.activeType].list[e].show && this.data.amount_id === this.data.dataList[this.data.activeType].list[e].id) {
            if (this.setData(a({}, "dataList[" + this.data.activeType + "].list[" + e + "].show", !1)), 
            console.log(">>>>>>>>>>>>>>>111", e, this.data.dataList[this.data.activeType].list[e].show), 
            this.data.myvideo.pause(), 1 == this.data.BasicSet.is_show_video_progress) {
                var i = this.selectComponent(".control-count-down");
                i && i.pause();
            }
        } else {
            if (this.judgmentpic(e), this.setData(a({
                show: !0,
                swiperDuration: 500,
                amount_id: this.data.dataList[this.data.activeType].list[e].id
            }, "dataList[" + this.data.activeType + "].list[" + e + "].show", !0)), console.log("aaaaaaaaa", e, this.data.dataList[this.data.activeType].list[e].show), 
            1 == this.data.BasicSet.is_show_video_progress) {
                var s = this.selectComponent(".control-count-down");
                s && s.start();
            }
            this.data.dataList[this.data.activeType].list[e].hasOwnProperty("member_like") || this.setData(a({}, "dataList[" + this.data.activeType + "].list[" + e + "].member_like", 1)), 
            this.data.logID = 0, this.data.myvideo.play();
        }
    },
    popularVideoChange: function(t) {
        clearTimeout(this.data.cleartime);
        var a = t.detail.current;
        this.data.realIndex = a, this.data.AnswerID = 0, this.data.cumulativeDuration = parseInt(this.data.cumulativeDuration + this.data.currentDuration), 
        this.data.currentDuration = 0, this.setData({
            commentlist: []
        }), this.data.dataList[this.data.activeType].activeVideoIndex = a, this.judgmentpic_2(a);
        var e = this.selectComponent(".control-count-down");
        e && e.reset();
    },
    judgmentpic_2: function(t) {
        var a = t, e = this;
        try {
            if (e.data.dataList[this.data.activeType].list[a] && e.data.dataList[this.data.activeType].list[a].cover) {
                var i = wx.createSelectorQuery();
                i.select("#pic_" + a).boundingClientRect(), i.exec(function(t) {
                    var i = e.data.screeheight;
                    t[0] && t[0].height ? t[0].height > Math.ceil(i * (7 / 8)) ? (e.setData({
                        minStyle: !1
                    }), e.getvideomessage(a)) : (e.setData({
                        minStyle: !0
                    }), e.getvideomessage(a)) : (e.setData({
                        minStyle: !0
                    }), e.getvideomessage(a));
                });
            } else e.setData({
                minStyle: !0
            }), e.getvideomessage(a);
        } catch (t) {
            e.setData({
                minStyle: !0
            }), e.getvideomessage(a);
        }
    },
    getvideomessage: function(t) {
        var e, i, s = this;
        (t == s.data.dataList[this.data.activeType].list.length - 2 && s.getMoreData(), 
        this.data.myvideo.pause(), s.setData({
            show: !1,
            showVideo: s.data.dataList[this.data.activeType].list[t]
        }), 0 === t) ? this.setData((a(e = {}, "dataList[" + this.data.activeType + "].list[" + t + "].show", !1), 
        a(e, "dataList[" + this.data.activeType + "].list[" + (t + 1) + "].show", !1), e)) : (this.setData((a(i = {}, "dataList[" + this.data.activeType + "].list[" + (t - 1) + "].show", !1), 
        a(i, "dataList[" + this.data.activeType + "].list[" + t + "].show", !1), i)), s.data.dataList[this.data.activeType].list[t + 1] && this.setData(a({}, "dataList[" + this.data.activeType + "].list[" + (t + 1) + "].show", !1)));
        try {
            wx.setStorageSync("vid", this.data.showVideo.id);
        } catch (t) {
            console.log(t);
        }
        this.data.cleartime = setTimeout(function() {
            s.clickSwiper(t);
        }, 300);
    },
    getMoreData: function() {
        var t = this, i = "", o = {};
        this.setData(a({}, "dataList[" + t.data.activeType + "].isLoadMore", !1)), this.data.dataList[this.data.activeType].page >= this.data.dataList[this.data.activeType].total_page || (this.data.dataList[this.data.activeType].page = this.data.dataList[this.data.activeType].page + 1, 
        "default" == this.data.dataList[this.data.activeType].code ? "card" == this.data.cardFrom ? (i = e.getNetAddresss("plugin.business-card.frontend.controllers.card.paging.videos"), 
        o.card_id = this.data.card_id) : "my" == t.data.cardFrom ? (i = e.getNetAddresss("plugin.video-share.frontend.video.my-video"), 
        o.vid = this.data.amount_id, o.status = this.data.sta, o.v_uid = this.options.uid || "") : i = e.getNetAddresss(1 == e.globalData.store_alone_temp ? s : "plugin.video-share.frontend.video.getList") : (i = e.getNetAddresss(1 == e.globalData.store_alone_temp ? s : "plugin.video-share.frontend.video.getList"), 
        "follow" == this.data.dataList[this.data.activeType].code ? o = {
            search: {
                is_follow: 1
            }
        } : "recommend" == this.data.dataList[this.data.activeType].code && (o = {
            search: {
                is_recommend: 1
            }
        })), o.page = t.data.dataList[t.data.activeType].page, e._postNetWork({
            url: i,
            data: o,
            success: function(e) {
                t.data.isLoadMore = !0;
                var i = e.data;
                if (1 == i.result) {
                    var s = i.data.list.data;
                    t.setData(a({}, "dataList[" + t.data.activeType + "].list", t.data.dataList[t.data.activeType].list.concat(s)));
                } else t.data.page = t.data.page - 1, t.data.isLoadMore = !1;
            },
            fail: function(t) {
                console.log(t);
            }
        }));
    },
    chooseUser: function(t) {
        if ("my" != this.data.cardFrom) {
            var a = t.currentTarget.dataset.item;
            if (this.data.BasicSet.topSmileLike && "" != this.data.BasicSet.topSmileLike) try {
                wx.navigateTo({
                    url: this.data.BasicSet.topSmileLike
                });
            } catch (t) {
                wx.redirectTo({
                    url: this.data.BasicSet.topSmileLike ? this.data.BasicSet.topSmileLike : "/packageG/index/index"
                });
            } else a.member && 0 != a.member.business_card && wx.navigateTo({
                url: "/packageB/member/business_card/BusinessCard/BusinessCard?card_id=" + a.member.business_card + "&mark=card"
            });
        }
    },
    toggleLike: function(t) {
        var i = t.currentTarget.dataset.index, s = t.currentTarget.dataset.item;
        this.data.dataList[this.data.activeType].list[i].member_like ? this.setData(a({}, "dataList[" + this.data.activeType + "].list[" + i + "].like_num", this.data.dataList[this.data.activeType].list[i].like_num + 1)) : this.data.dataList[this.data.activeType].list[i].like_num > 0 && this.setData(a({}, "dataList[" + this.data.activeType + "].list[" + i + "].like_num", this.data.dataList[this.data.activeType].list[i].like_num - 1)), 
        this.setData(a({}, "dataList[" + this.data.activeType + "].list[" + i + "].member_like", !this.data.dataList[this.data.activeType].list[i].member_like));
        var o = e.getNetAddresss("plugin.video-share.frontend.video.like"), d = {
            video_goods_id: s.id
        };
        e._postNetWork({
            url: o,
            showToastIn: !1,
            data: d,
            success: function(t) {
                var a = t.data;
                0 == a.result && wx.showToast({
                    icon: "none",
                    title: a.msg,
                    duration: 1500
                });
            },
            fail: function(t) {}
        });
    },
    shareVideo: function() {},
    setVideoShareShow: function() {
        this.setData({
            "videoShare.show": !this.data.videoShare.show
        });
    },
    close: function() {
        this.setData({
            showShare: !1
        });
    },
    toGood: function(t) {
        var a = t.currentTarget.dataset.item;
        wx.navigateTo({
            url: "/packageA/detail_v2/detail_v2?id=" + a.goods_id + "&vid=" + a.id
        });
    },
    judgmentpic: function(t) {
        var a = t, e = this, i = wx.createSelectorQuery();
        i.select("#pic_" + a).boundingClientRect(), i.exec(function(t) {
            var a = e.data.screeheight;
            t[0] && t[0].height && (t[0].height > Math.ceil(a * (7 / 8)) ? e.setData({
                minStyle: !1
            }) : e.setData({
                minStyle: !0
            }));
        });
    },
    onLoadedmetadata: function(t) {
        0 == this.data.maxTime && this.data.is_openRedpack ? (this.data.maxTime = parseInt(t.detail.duration), 
        this.getViewTimelog()) : this.data.maxTime = parseInt(t.detail.duration), this.setData({
            maxTime: this.data.maxTime
        }), console.log("视频总时长", this.data.maxTime);
    },
    imgLoadFunc: function() {},
    onTimeupdate: function(t) {
        this.data.currentDuration = t.detail.currentTime;
        var a = parseInt((this.data.cumulativeDuration + this.data.currentDuration) / 60);
        this.data.openRedpackTimes.indexOf(a) > -1 && (this.data.openRedpackTimes.splice(0, 1), 
        console.log("删除一个累计时长条件", this.data.openRedpackTimes), this.includeRedpackID("time", a)), 
        this.loadPercent(t.detail.currentTime, this.data.maxTime);
    },
    loadPercent: function(t, a) {
        var e = t / a * 360, i = 0, s = 0;
        e < 180 ? (i = e + -44, s = -46) : (i = 135, s = e - 180 - 45), this.setData({
            rotateLeft: s,
            rotateRight: i
        });
    },
    endedPlay: function() {
        console.log("播放结束"), this.data.cumulativeDuration = parseInt(this.data.cumulativeDuration + this.data.currentDuration), 
        this.data.currentDuration = 0, "video" == this.data.options.task_type && this.finishTask();
        var t = this.selectComponent(".control-count-down");
        t && t.reset(), this.getSubject();
    },
    shareTask: function() {
        var t = {
            record_id: this.data.options.taskID,
            task_type: "share",
            day: this.data.options.taskDay,
            task_record_id: this.data.amount_id
        }, a = e.getNetAddresss("plugin.task-package.frontend.daily-record.finish-task");
        e._postNetWork({
            url: a,
            showToastIn: !1,
            data: t,
            success: function(t) {},
            fail: function(t) {}
        });
    },
    finishTask: function() {
        var t = {
            record_id: this.data.options.taskID,
            task_type: this.data.options.task_type,
            day: this.data.options.taskDay,
            task_record_id: this.data.amount_id
        }, a = e.getNetAddresss("plugin.task-package.frontend.daily-record.finish-task");
        e._postNetWork({
            url: a,
            showToastIn: !1,
            data: t,
            success: function(t) {},
            fail: function(t) {}
        });
    },
    onPlaying: function(t) {
        console.log("onPlaying=================", t), 0 != this.data.maxTime && this.data.is_openRedpack && this.getViewTimelog(), 
        this.addRecord();
    },
    addRecord: function() {
        var t = e.getNetAddresss("plugin.video-share.frontend.video.addRecord");
        e._postNetWork({
            url: t,
            showToastIn: !1,
            data: {
                video_id: this.data.amount_id
            },
            success: function(t) {},
            fail: function(t) {}
        });
    },
    getViewTimelog: function() {
        if (this.data.logID != this.data.amount_id) {
            this.data.logID = this.data.amount_id;
            var t = e.getNetAddresss("plugin.video-redpack.frontend.activity.logViewTime"), a = {
                video_id: this.data.amount_id,
                video_length: this.data.maxTime
            };
            e._postNetWork({
                url: t,
                showToastIn: !1,
                data: a,
                success: function(t) {},
                fail: function(t) {}
            });
        }
    },
    includeRedpackID: function(t, a, e, i) {
        if (this.data.is_openRedpack) {
            if ("success" === e && this.setData({
                showVideoAnswer: !1,
                logID: 0
            }), "time" == t) {
                for (var s = 0; s < this.data.openRedpackData.length; s++) if (this.data.openRedpackData[s].view_time_data === a) return this.data.activity_reward_id = this.data.openRedpackData[s].activity_id, 
                console.log("达到红包累计时长", this.data.amount_id, this.data.activity_reward_id), void this.getRedpackReward(1, 1);
            } else if ("vid" == t) for (var o = 0; o < this.data.openRedpackData.length; o++) if (this.data.openRedpackData[o].view_finish_ids.indexOf(this.data.amount_id) > -1) return this.data.activity_reward_id = this.data.openRedpackData[o].activity_id, 
            console.log("短视频红包指定视频", this.data.amount_id, this.data.activity_reward_id), void this.getRedpackReward(2, 1);
            if (this.data.videoShare.needAnswer && this.data.points_plugin && this.data.videoShare.is_show) return void this.setData({
                "videoShare.show": !0
            });
            "success" === e && this.setData({
                showVideoAnswer: !1,
                successShow: !0
            }), "fail" === e && wx.showToast({
                title: i,
                icon: "none",
                duration: 1500
            }), this.data.myvideo.play(), this.getViewTimelog();
        } else {
            if (this.data.videoShare.needAnswer && this.data.points_plugin && this.data.videoShare.is_show) return void this.setData({
                "videoShare.show": !0
            });
            "success" === e && this.setData({
                showVideoAnswer: !1,
                successShow: !0
            }), "fail" === e && wx.showToast({
                title: i,
                icon: "none",
                duration: 1500
            });
        }
    },
    getRedpackReward: function(t, i) {
        var s = this;
        this.data.reward_type = t;
        var o = e.getNetAddresss("plugin.video-redpack.frontend.activity.reward"), d = {
            video_id: this.data.amount_id,
            activity_id: this.data.activity_reward_id,
            reward_type: t,
            request_type: i,
            video_length: this.data.maxTime
        };
        e._postNetWork({
            url: o,
            showToastIn: !1,
            data: d,
            success: function(t) {
                var e, o = t.data;
                1 == o.result ? 1 == i ? (s.data.myvideo.pause(), s.setData({
                    redpack_info: o.data,
                    showRedpack: !0
                }), 1 == o.data.bind_mobile && 0 == o.data.member_bind_mobile && s.setData({
                    bind_mobile: !0
                })) : s.setData((a(e = {}, "redpack_info.amount", o.data.amount), a(e, "openRedpack", !0), 
                e)) : wx.showToast({
                    icon: "none",
                    title: o.msg,
                    duration: 1500
                });
            },
            fail: function(t) {}
        });
    },
    openRedpackM: function() {
        if (1 == this.data.redpack_info.bind_mobile && 0 == this.data.redpack_info.member_bind_mobile) return this.getimgdata(), 
        void this.setData({
            showVerification: !0
        });
        this.getRedpackReward(this.data.reward_type, 2);
    },
    getimgdata: function(t) {
        var a = this, i = e.getNetAddresss("home-page.getCaptcha");
        t ? t.captcha && a.setData({
            imgcode: t.captcha.img
        }) : e._getNetWork({
            url: i,
            validateBol: 2,
            success: function(t) {
                var e = t.data;
                1 == e.result && e.data.captcha && a.setData({
                    imgcode: e.data.captcha.img
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    },
    getPhoneNumber: function(t) {
        var a = t.detail;
        "getPhoneNumber:ok" == t.detail.errMsg ? this.getPhoneM(a.code) : this.setData({
            showVerification: !0
        });
    },
    getPhoneM: function(t) {
        var a = e.getNetAddresss("member.member.miniMemberMobile"), i = this;
        e._postNetWork({
            url: a,
            data: {
                code: t
            },
            showToastIn: !1,
            success: function(t) {
                var a = t.data;
                1 == a.result ? i.setData({
                    "form.mobile": a.data.phone_info.purePhoneNumber,
                    showVerification: !0
                }) : wx.showToast({
                    icon: "none",
                    title: a.msg,
                    duration: 1500
                });
            },
            fail: function(t) {}
        });
    },
    mobileinp: function(t) {
        var a = t.detail.value;
        this.setData({
            "form.mobile": a.trim()
        });
    },
    captchainp: function(t) {
        var a = t.detail.value;
        this.setData({
            "form.captcha": a.trim()
        });
    },
    codeinp: function(t) {
        var a = t.detail.value;
        this.setData({
            "form.code": a.trim()
        });
    },
    sendCode: function(t) {
        if (this.data.start1) return !1;
        var a = 60, e = this;
        e.setData({
            start1: !0,
            codetext: "(" + a + ")秒后重新获取"
        });
        var i = setInterval(function() {
            e.setData({
                codetext: "(" + --a + ")秒后重新获取"
            });
        }, 1e3);
        setTimeout(function() {
            e.setData({
                codetext: "获取短信验证码",
                start1: !1
            }), clearInterval(i);
        }, 6e4), e.verificationCode(i);
    },
    verificationCode: function(t) {
        var a = this;
        if (e._isTextEmpty(this.data.form.mobile)) return wx.showToast({
            icon: "none",
            title: "请填写手机号",
            duration: 1500
        }), a.setData({
            codetext: "获取短信验证码",
            start1: !1
        }), void clearInterval(t);
        if (e._isMoblie(this.data.form.mobile)) wx.showToast({
            icon: "none",
            title: "请填写正确的手机号",
            duration: 1500
        }); else {
            if (e._isTextEmpty(this.data.form.captcha) && this.data.imgcode) return wx.showToast({
                icon: "none",
                title: "请填图形验证码",
                duration: 1500
            }), a.setData({
                codetext: "获取短信验证码",
                start1: !1
            }), void clearInterval(t);
            var i = e.getNetAddresss("member.register.sendCodeV2");
            i += "&mobile=" + this.data.form.mobile, i += "&captcha=" + this.data.form.captcha, 
            i += "&code=" + this.data.form.code, e._getNetWork({
                url: i,
                validateBol: 2,
                success: function(e) {
                    var i = e.data;
                    1 == i.result ? wx.showToast({
                        icon: "none",
                        title: "已发送",
                        duration: 1500
                    }) : (wx.showToast({
                        icon: "none",
                        title: i.msg,
                        duration: 1500
                    }), a.setData({
                        "form.captcha": "",
                        start1: !1,
                        codetext: "获取短信验证码"
                    }), clearTimeout(t), a.getimgdata());
                },
                fail: function(t) {
                    console.log(t);
                }
            });
        }
    },
    alterAction: function() {
        if (e._isTextEmpty(this.data.form.mobile)) wx.showToast({
            icon: "none",
            title: "请填写手机号",
            duration: 1500
        }); else if (e._isMoblie(this.data.form.mobile)) wx.showToast({
            icon: "none",
            title: "请填写正确的手机号",
            duration: 1500
        }); else if (e._isTextEmpty(this.data.form.code)) wx.showToast({
            icon: "none",
            title: "请填验证码",
            duration: 1500
        }); else {
            var t = e.getNetAddresss("plugin.video-redpack.frontend.activity.bindMobile");
            e._postNetWork({
                url: t,
                showToastIn: !1,
                data: that.data.form,
                validateBol: 2,
                success: function(t) {
                    var a = t.data;
                    1 == a.result ? (console.log(that.data), that.getRedpackReward(that.data.reward_type, 2), 
                    that.setData({
                        showVerification: !1,
                        showRedpack: !0
                    })) : wx.showToast({
                        icon: "none",
                        title: a.msg,
                        duration: 1500
                    });
                },
                fail: function(t) {}
            });
        }
    },
    cloneVerification: function() {
        var t;
        this.setData((a(t = {
            showVerification: !1
        }, "form.captcha", ""), a(t, "form.code", ""), t));
    },
    cloneAnswer: function() {
        this.setData({
            errorShow: !1,
            successShow: !1,
            logID: 0,
            AnswerID: 0
        }), this.data.myvideo.play(), this.getViewTimelog();
    },
    cloneRedpack: function() {
        this.setData({
            logID: 0,
            AnswerID: 0,
            showRedpack: !1,
            openRedpack: !1
        }), 2 == this.data.reward_type && this.getViewTimelog(), this.data.myvideo.play();
    },
    followMember: function(t) {
        var i = this, s = e.getNetAddresss("plugin.video-share.frontend.video.editFollow");
        e._getNetWork({
            url: s,
            data: {
                member_id: t.currentTarget.dataset.uid,
                follow_type: 1 == t.currentTarget.dataset.fllow ? 2 : 1
            },
            success: function(e) {
                var s = e.data;
                if (1 == s.result) {
                    for (var o = 1 == t.currentTarget.dataset.fllow ? 0 : 1, d = t.currentTarget.dataset.uid, n = 0; n < i.data.dataList.length; n++) for (var r = 0; r < i.data.dataList[n].list.length; r++) i.data.dataList[n].list[r].member && i.data.dataList[n].list[r].member.uid == d && i.setData(a({}, "dataList[" + n + "].list[" + r + "].is_follow", o));
                    var c = 1 == t.currentTarget.dataset.fllow ? "已取消关注" : "关注成功";
                    wx.showToast({
                        title: c,
                        icon: "none",
                        duration: 1500
                    });
                } else wx.showToast({
                    title: s.msg,
                    icon: "none",
                    duration: 1500
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    },
    onIconLink: function() {
        if ("" != this.data.BasicSet.iconSmileLink) try {
            wx.navigateTo({
                url: this.data.BasicSet.iconSmileLink
            });
        } catch (t) {
            wx.redirectTo({
                url: this.data.BasicSet.iconSmileLink ? this.data.BasicSet.iconSmileLink : "/packageG/index/index"
            });
        }
    },
    gotoLiveRoom: function(t) {
        t.currentTarget.dataset.rid ? wx.navigateTo({
            url: "/packageD/directSeeding/livePage/livePage?id=" + t.currentTarget.dataset.rid + "&playerType=live"
        }) : wx.showToast({
            title: "直播间id获取失败！",
            icon: "none",
            duration: 1500
        });
    },
    gotoUrl: function(t) {
        var a = t.currentTarget.dataset;
        "advertisingPutAD" != a.name ? wx.navigateTo({
            url: "/packageH/Advertising/advertisingList/advertisingList?tag=video&id=" + a.id
        }) : a.iser ? wx.navigateTo({
            url: "/packageH/Advertising/advertisingPutAD/advertisingPutAD?tag=video&id=" + a.id
        }) : wx.navigateTo({
            url: "/packageH/Advertising/advertisingApply/advertisingApply"
        });
    },
    cloneADbtn: function(t) {
        var a = t.currentTarget.dataset;
        "1" == a.tag && this.setData({
            isShowADLook: !1
        }), "2" == a.tag && this.setData({
            isShowADPut: !1
        });
    },
    gotoHome: function() {
        wx.reLaunch({
            url: "/packageG/index/index"
        });
    },
    toComment: function() {
        this.data.commentlist.length > 0 ? this.setData({
            showYzComment: !0
        }) : this.getCommentData();
    },
    cloneCOMInput: function() {
        this.setData({
            showYzComment: !1
        });
    },
    getCommentData: function() {
        var t = this;
        this.setData({
            commentLoading: !0,
            showYzComment: !0,
            commentPage: 1
        });
        var a = e.getNetAddresss("plugin.video-share.frontend.comment.comment-list");
        e._getNetWork({
            url: a,
            data: {
                video_id: this.data.amount_id
            },
            success: function(a) {
                var e = a.data;
                t.setData({
                    commentLoading: !1
                }), 1 == e.result ? t.setData({
                    commentTotal: e.data.num,
                    commentlist: e.data.list.data,
                    commentFinished: e.data.list.last_page <= 1
                }) : wx.showToast({
                    title: e.msg,
                    icon: "none",
                    duration: 1500
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    },
    onCommentMore: function() {
        var t = this;
        if (!this.data.commentFinished && !this.data.commentLoading) {
            console.log("触发加载更多"), this.setData({
                commentLoading: !0
            });
            var a = e.getNetAddresss("plugin.video-share.frontend.comment.comment-list");
            e._getNetWork({
                url: a,
                data: {
                    video_id: this.data.amount_id,
                    page: this.data.commentPage + 1
                },
                success: function(a) {
                    var e = a.data;
                    t.setData({
                        commentLoading: !1
                    }), 1 == e.result ? t.setData({
                        commentlist: t.data.commentlist.concat(e.data.list.data),
                        commentFinished: e.data.list.current_page >= e.data.list.last_page
                    }) : wx.showToast({
                        title: e.msg,
                        icon: "none",
                        duration: 1500
                    });
                },
                fail: function(t) {
                    console.log(t);
                }
            });
        }
    },
    sendComment: function(t) {
        var i = this, s = t.detail.text, o = t.detail.options, d = o.type, n = o.index, r = o.childIndex, c = {
            content: s
        }, l = "plugin.video-share.frontend.comment.create-comment";
        "main" == d ? c.video_id = this.data.amount_id : "reply" == d ? (c.comment_id = this.data.commentlist[n].id, 
        l = "plugin.video-share.frontend.comment.reply-comment") : "childReply" == d && (c.comment_id = this.data.commentlist[n].append_arr[r].id, 
        l = "plugin.video-share.frontend.comment.reply-comment"), e._getNetWork({
            url: e.getNetAddresss(l),
            data: c,
            success: function(t) {
                var e = t.data;
                if (wx.showToast({
                    title: e.msg,
                    icon: "none",
                    duration: 1500
                }), 1 == e.result) {
                    var s = i.data.commentlist;
                    "1" == e.data.type ? (s.unshift({
                        append_arr: [],
                        id: e.data.id,
                        support_num: 0,
                        head_image: e.data.head_img_url,
                        nick_name: e.data.nick_name,
                        created_at: e.data.created_at,
                        content: e.data.content,
                        can_del: 1
                    }), i.setData({
                        commentTotal: i.data.commentTotal + 1
                    })) : "2" == e.data.type && s[n].append_arr.unshift({
                        id: e.data.reply_comment_id,
                        support_num: 0,
                        head_image: e.data.head_img_url,
                        nick_name: e.data.nick_name,
                        created_at: e.data.created_at,
                        content: e.data.content,
                        can_del: 1,
                        reply_name: e.data.reply_name
                    }), i.setData({
                        commentlist: s
                    }), i.setData(a({}, "dataList[" + i.data.activeType + "].list[" + i.data.realIndex + "].comment_num", s.length));
                }
            },
            fail: function(t) {
                console.log(t);
            }
        });
    },
    delComment: function() {
        var t = this, a = this.data.commentInputOptiones, i = a.type, s = a.index, o = a.childIndex, d = {
            comment_id: "reply" == i ? this.data.commentlist[s].id : this.data.commentlist[s].append_arr[o].id
        };
        e._getNetWork({
            url: e.getNetAddresss("plugin.video-share.frontend.comment.del"),
            data: d,
            success: function(a) {
                var e = a.data;
                if (1 == e.result) {
                    wx.showToast({
                        title: "已删除",
                        icon: "none",
                        duration: 1500
                    });
                    var d = t.data.commentlist;
                    "reply" == i ? (d.splice(s, 1), t.setData({
                        commentTotal: t.data.commentTotal - 1
                    })) : "childReply" == i && d[s].append_arr.splice(o, 1), t.setData({
                        commentlist: d
                    });
                } else wx.showToast({
                    title: e.msg,
                    icon: "none",
                    duration: 1500
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    },
    clickLikeItem: function(t) {
        var i = this, s = t.currentTarget.dataset, o = s.index, d = s.itemindex, n = s.status, r = {
            comment_id: this.data.commentlist[o].id
        };
        null != d && "" !== d && (r.comment_id = this.data.commentlist[o].append_arr[d].id);
        var c = e.getNetAddresss("plugin.video-share.frontend.comment.support");
        e._getNetWork({
            url: c,
            data: r,
            success: function(t) {
                var e = t.data;
                if (1 == e.result) if (null != d && "" !== d) {
                    var s, r = i.data.commentlist[o].append_arr[d].support_num;
                    i.setData((a(s = {}, "commentlist[" + o + "].append_arr[" + d + "].is_support", !n), 
                    a(s, "commentlist[" + o + "].append_arr[" + d + "].support_num", n ? --r : ++r), 
                    s));
                } else {
                    var c, l = i.data.commentlist[o].support_num;
                    i.setData((a(c = {}, "commentlist[" + o + "].is_support", !n), a(c, "commentlist[" + o + "].support_num", n ? --l : ++l), 
                    c));
                } else wx.showToast({
                    title: e.msg,
                    icon: "none",
                    duration: 1500
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    },
    showCOMInput: function(t) {
        var a = 1 == t.currentTarget.dataset.authority;
        this.setData({
            commentInputOptiones: t.detail
        }), "main" != t.detail.type && a ? this.setData({
            showSheet: !0
        }) : this.setData({
            showCommentInput: !0
        });
    },
    onCloseSheet: function() {
        this.setData({
            showSheet: !1
        });
    },
    getRely: function(t) {
        var i = this, s = this.data.commentlist[t.detail.index].id, o = Math.floor(this.data.commentlist[t.detail.index].append_arr.length / 5) + 1, d = e.getNetAddresss("plugin.video-share.frontend.comment.get-replys");
        e._getNetWork({
            url: d,
            data: {
                comment_id: s,
                page: o
            },
            success: function(e) {
                var s = e.data;
                1 == s.result ? i.setData(a({}, "commentlist[" + t.detail.index + "].append_arr", i.data.commentlist[t.detail.index].append_arr.concat(s.data.data))) : wx.showToast({
                    title: s.msg,
                    icon: "none",
                    duration: 1500
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    },
    onSelectSheet: function(t) {
        var a = t.detail.index;
        0 == a ? this.setData({
            showCommentInput: !0
        }) : 1 == a && this.delComment();
    },
    updateShare: function() {
        if (this.data.amount_id) {
            var t = e.getNetAddresss("plugin.video-share.frontend.video.share");
            t += "&video_goods_id=" + this.data.amount_id, e._getNetWork({
                url: t
            });
        }
    }
});